package com.zhuhjay.controller;

import com.zhuhjay.model.domain.HttpResult;
import com.zhuhjay.model.dto.RecordSearchDto;
import com.zhuhjay.model.vo.RecordVo;
import com.zhuhjay.service.RecordService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ZhuHJay
 * @date 2023/4/26 19:58
 */
@RestController
@RequestMapping("/record")
public class RecordController {

    @Resource
    private RecordService recordService;

    @GetMapping("search.auth")
    public HttpResult<List<RecordVo>> search(RecordSearchDto searchDto) {
        return HttpResult.ok(recordService.search(searchDto));
    }

}
